<%@ page contentType="text/html; charset=Utf-8"%>
<%@include file="../common/web_head.jsp"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<title></title>
</head>
<body>
	<%@include file="/page/common/header.jsp"%>
	<div class="w main">
		<div class="left">
			<%@include file="rightMenu.jsp"%>
		</div>
		<div class="right">
			<div class="o-mt">
				<h2>设备型号一览</h2>
			</div>
			<div class="m m5" id="order02">
				<div class="mc">
					<div class="tb-void">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<th width="60">No</th>
								<th width="200">设备名称</th>
								<th width="200">设备类型</th>
								<th width="260">描述</th>
								<th colspan="3" width="280">操作</th>
							</tr>
							<s:iterator value="pager.list" id='device' status='st'>
								<tr>
									<td><s:property value='#st.index+1' /></td>
									<td><div class="al">
											<s:property value='#device.name' />
										</div></td>
									<td><div class="al">
											<s:property value='#device.deviceType.name' />
										</div></td>
									<td><div class="al">
											<s:property value='#device.description' />
										</div></td>
									<td width="120"><a target="_self"
											href="<%=basepath%>/getDeviceModelCommandList.action?deviceModelId=${device.id}">设备指令设定</a>
									</td>
									<td width="60"><a target="_self"
											href="<%=basepath%>/toUpdateDeviceModel.action?targetId=${device.id}">修正</a></td>
									<td width="60"><a target="_self"
											href="<%=basepath%>/deleteDeviceModel.action?targetId=${device.id}">删除</a></td>
								</tr>
							</s:iterator>
						</table>
					</div>
				</div>
				<div class="m clearfix">
					<div class="pagin fr">
						<pg:pager url="initDeviceModelList.action" maxPageItems="10" items="${pager.total}"
							export="currentPageNumber=pageNumber">
							<pg:first>
								<a href="${pageUrl}" mce_href="${pageUrl}">首页</a>
							</pg:first>
							<pg:prev>
								<a href="${pageUrl }" mce_href="${pageUrl }">上一页</a>
							</pg:prev>
							<pg:pages>
								<c:choose>
									<c:when test="${currentPageNumber eq pageNumber}">
										<font color="red">${pageNumber }</font>
									</c:when>
									<c:otherwise>
										<a href="${pageUrl }" mce_href="${pageUrl }">${pageNumber }</a>
									</c:otherwise>
								</c:choose>
							</pg:pages>
							<pg:next>
								<a href="${pageUrl }" mce_href="${pageUrl }">下一页</a>
							</pg:next>
							<pg:last>
								<a href="${pageUrl }" mce_href="${pageUrl }">尾页</a>
							</pg:last>
						</pg:pager>
					</div>
				</div>
				<div></div>
			</div>
		</div>
	</div>
</body>
</html>
